package anni.atracker.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import anni.core.grid.LongGridBean;

import org.hibernate.annotations.GenericGenerator;


/**
 * TrackerIssue generated by Lingo.
 *
 * @author Lingo
 * @since 2007年10月07日 下午 18时23分51秒593
 */
@Entity
@Table(name = "A_TRACKER_ISSUE")
public class TrackerIssue extends LongGridBean {
    /** * serial. */
    static final long serialVersionUID = 0L;

    /** * id. */
    private Long id;

    /** * trackerProject. */
    private TrackerProject trackerProject;

    /** * name. */
    private String name;

    /** * priority. */
    private Integer priority;

    /** * severity. */
    private Integer severity;

    /** * status. */
    private Integer status;

    /** * assignTo. */
    private String assignTo;

    /** * submitBy. */
    private String submitBy;

    /** * addTime. */
    private Date addTime;

    /** * updateDate. */
    private Date updateDate;

    /** * content. */
    private String content;

    /** * file. */
    private String file;

    /** * 构造方法. */
    public TrackerIssue() {
    }

    /** * @return id. */
    @GenericGenerator(name = "generator", strategy = "increment")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    /** * @param id Long. */
    public void setId(Long id) {
        this.id = id;
    }

    /** * @return trackerProject. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROJECT_ID")
    public TrackerProject getTrackerProject() {
        return trackerProject;
    }

    /** * @param trackerProject TrackerProject. */
    public void setTrackerProject(TrackerProject trackerProject) {
        this.trackerProject = trackerProject;
    }

    /** * @return name. */
    @Column(name = "NAME", length = 50)
    public String getName() {
        return name;
    }

    /** * @param name String. */
    public void setName(String name) {
        this.name = name;
    }

    /** * @return priority. */
    @Column(name = "PRIORITY")
    public Integer getPriority() {
        return priority;
    }

    /** * @param priority Integer. */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    /** * @return severity. */
    @Column(name = "SEVERITY")
    public Integer getSeverity() {
        return severity;
    }

    /** * @param severity Integer. */
    public void setSeverity(Integer severity) {
        this.severity = severity;
    }

    /** * @return status. */
    @Column(name = "STATUS")
    public Integer getStatus() {
        return status;
    }

    /** * @param status Integer. */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /** * @return assignTo. */
    @Column(name = "ASSIGN_TO", length = 50)
    public String getAssignTo() {
        return assignTo;
    }

    /** * @param assignTo String. */
    public void setAssignTo(String assignTo) {
        this.assignTo = assignTo;
    }

    /** * @return submitBy. */
    @Column(name = "SUBMIT_BY", length = 50)
    public String getSubmitBy() {
        return submitBy;
    }

    /** * @param submitBy String. */
    public void setSubmitBy(String submitBy) {
        this.submitBy = submitBy;
    }

    /** * @return addTime. */
    @Column(name = "ADD_TIME")
    public Date getAddTime() {
        if (addTime != null) {
            return (Date) addTime.clone();
        } else {
            return null;
        }
    }

    /** * @param addTime Date. */
    public void setAddTime(Date addTime) {
        if (addTime != null) {
            this.addTime = (Date) addTime.clone();
        } else {
            this.addTime = null;
        }
    }

    /** * @return updateDate. */
    @Column(name = "UPDATE_DATE")
    public Date getUpdateDate() {
        if (updateDate != null) {
            return (Date) updateDate.clone();
        } else {
            return null;
        }
    }

    /** * @param updateDate Date. */
    public void setUpdateDate(Date updateDate) {
        if (updateDate != null) {
            this.updateDate = (Date) updateDate.clone();
        } else {
            this.updateDate = null;
        }
    }

    /** * @return content. */
    @Column(name = "CONTENT", length = 6000)
    @Lob
    public String getContent() {
        return content;
    }

    /** * @param content String. */
    public void setContent(String content) {
        this.content = content;
    }

    /** * @return file. */
    @Column(name = "FILE", length = 100)
    public String getFile() {
        return file;
    }

    /** * @param file String. */
    public void setFile(String file) {
        this.file = file;
    }
}
